package com.epam.xml.bank;

import java.util.HashMap;

import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement
@XmlType(propOrder={"id", "currencyAndAmount", "card"})
public class Account {
	private int id;
	private HashMap<String, Integer> currencyAndAmount;
	private Card card;
	
	public Account() {
		
	}
	
	public Account(int id, HashMap<String, Integer> currencyAndAmount, Card card) {
		this.id = id;
		this.currencyAndAmount = currencyAndAmount;
		this.card = card;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public HashMap<String, Integer> getCurrencyAndAmount() {
		return currencyAndAmount;
	}
	@XmlElementWrapper(name="currency-amount")
	
	public void setCurrencyAndAmount(HashMap<String, Integer> currencyAndAmount) {
		this.currencyAndAmount = currencyAndAmount;
	}

	public Card getCard() {
		return card;
	}

	public void setCard(Card card) {
		this.card = card;
	}

	@Override
	public String toString() {
		return "Account [id=" + id + ", currencyAndAmount=" + currencyAndAmount
				+ ", card=" + card + "]";
	}
	
	
	
}
